package cn.edu.zafu.bigdata.x.wupeng.d;

interface ISayHello {
    void sayHello();
}
interface IAction {
    void move();
}
class Vehicle {
    public void run(){
        System.out.println("Vehicle run");
    }
}

class Car extends Vehicle implements ISayHello,IAction{

    @Override
    public void move() {
        System.out.println("Car is moving");
    }

    @Override
    public void sayHello() {
        System.out.println("Hello,this is a Car.");
    }
    public void run(){
        System.out.println("Car run");
    }
}

public class TestInterface {
    public static void main(String[] args) {
        Car car = new Car();
        car.move();
        car.run();
        car.sayHello();
        ISayHello ish = car;
        ish.sayHello();
        IAction ia = car;
        ia.move();
        Vehicle v = car;
        v.run();

    }
}
